home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / gfx / 3d / rayshade40_enh2.lha / Examples / projector.ray < prev    next >
Text File  |  1992-10-15  |  818b  |  38 lines

  1. /* 
  2.  * Sample program which uses a "projector" light source
  3.  * Written by Greg Spencer.
  4.  *
  5.  * Obviously, this requires an image to project.  I used the ever-popular
  6.  * mandrill, but you can use what you want.
  7.  *
  8.  * This is a simple scene, which basically projects the image over a ball
  9.  * sitting on a plane.
  10.  */
  11.  
  12. background .1 .1 .1
  13. eyep 0 0 -40
  14. lookp 0 0 0
  15. up 0 1 0
  16. fov 60 45
  17. report verbose
  18. screen 300 300
  19. outfile testproj.mtv
  20.  
  21. surface white ambient 0.1 0.1 0.1
  22.     diffuse 1.0 1.0 1.0
  23.     specular 0.4 0.4 0.4 
  24.     specpow 10
  25.  
  26. light 1.0 projector cork.mtv tile 1 1 /* options 'tile' and 'smooth'
  27.                     are allowed here */
  28.     0 10 -30  /* from */
  29.     0 0 0 /* to */
  30.     1 1 0 /* up (u): v=dirXu */
  31.     60 /* u angle */
  32.     60 /* v angle */
  33.     false /* Don't use R^2 falloff in intensity */
  34.  
  35. plane white 0 0 0  0 0 -1
  36.  
  37. sphere white 5 0 0 -10 
  38.